/*
 * @Description: 
 * @Author: wanghongjian
 * @@github: https://github.com/whj0117
 * @Date: 2025-11-06 17:16:47
 * @LastEditors: wanghongjian
 * @LastEditTime: 2025-11-30 14:45:35
 */
// 移除 Cookies
// 考虑安全问题
// import Cookies from 'js-cookie'
const TokenKey = 'Admin-Token'

export function getToken() {
  return localStorage.getItem(TokenKey)
}

export function setToken(token) {
  return localStorage.setItem(TokenKey, token)
}

export function removeToken() {
  return localStorage.removeItem(TokenKey)
}

export function getCompanyId(){
  return localStorage.getItem('companyId')
}

export function setCompanyId(companyId){
  return localStorage.setItem('companyId',companyId)
}

export function removeCompanyId(){
  return localStorage.removeItem('companyId')
}

export function setCommonConstantsStorage(data){
  return localStorage.setItem('commonConstants', data)
}

export function getCommonConstantsStorage(){
  return JSON.parse(localStorage.getItem('commonConstants'))
}